<!DOCTYPE HTML>
<html xmlns:fb="http://ogp.me/ns/fb#" xmlns:og="http://ogp.me/ns#" xml:lang="th" lang="th">
<head>
	<meta charset="utf-8">
    <title><?php echo $seo_title;?></title>
    <meta name="title" content="<?php echo htmlspecialchars($seo_title, ENT_COMPAT, 'UTF-8');?>" />
    <meta name="keywords"  content="<?php echo htmlspecialchars($seo_keyword, ENT_COMPAT, 'UTF-8');?>" />
    <meta name="description" content="<?php echo addslashes($seo_description);?>" />
    <meta property="fb:app_id" content="<?php echo $fb_api;?>" />
    <meta property="og:title" content="<?php echo htmlspecialchars((!empty($fb_title) ? $fb_title:$seo_title), ENT_COMPAT, 'UTF-8');?>" />
    <meta property="og:description" content="<?php echo htmlspecialchars((!empty($fb_description) ? $fb_description:$seo_description), ENT_COMPAT, 'UTF-8');?>" />
    <meta property="og:type" content="<?php echo $fb_type;?>" />
	<meta property="og:image" content="<?php echo (!empty($fb_image) ? $fb_image:image_asset_url('default/logo.png'));?>" />
	<link rel="image_src" href="<?php echo (!empty($fb_image) ? $fb_image:image_asset_url('default/logo.png'));?>" />
	<meta name="googlebot" content="index,follow"/>
	<meta name="robots" content="index, follow, all"/>
	<meta name="author" content="You2Play.com"/>
	<meta http-equiv="Cache-Control" content="no-store">
	<meta http-equiv="Pragma" content="no-cache">
	<meta http-equiv="Expires" content="-1"> 
	<?php if(!empty($fb_media)):?>
  		<meta property="og:video" content="<?php echo $fb_media;?>" />
      	<meta property="og:video:type" content="application/x-shockwave-flash" />
      	<meta property="og:video:width" content="1280" />
      	<meta property="og:video:height" content="720" />
		<link rel="video_src" href="<?php echo $fb_media;?>" />	
		<meta name="video_type" content="application/x-shockwave-flash" />
	<?php endif;?>	
	<link rel="icon" href="<?php echo image_asset_url('../css/images/favicon.ico');?>" type="image/x-icon" />
	<link rel="shortcut icon" href="<?php echo image_asset_url('../css/images/favicon.ico');?>" type="image/x-icon" />
	<script type="text/javascript">
	 	/*Set Initail*/
		//document.domain = 'you2play.com';
		var web_path = '<?php echo base_url();?>';
		var protocol = (window.location.protocol == "https:" ? "https":"http");
		if(protocol == "https") window.location.href = window.location.href.replace(protocol,'http');
	</script>	
	<?php if(!empty($ga_id)):?>
		<script type="text/javascript">
		  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
		  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
		  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
		  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

		  ga('create', 'UA-16730596-<?php echo $ga_id;?>', 'you2play.com');
		  ga('send', 'pageview');

		</script>		
		<?php if($ga_id != 1):?>
			<script type="text/javascript">
				ga('create', 'UA-16730596-1', 'you2play.com', {'name':'secondTracker'});
			  	ga('secondTracker.send', 'pageview');
			</script>						
		<?php endif;?>	
		<?php if(!empty($ga_event)):?>
			<script type="text/javascript">
				ga('send', 'event', ''+window.location.hostname+'', 'view', '<?php echo $ga_event;?>');
			</script>
			<?php if($ga_id != 1):?>
				<script type="text/javascript">
					ga('secondTracker.send', 'event', ''+window.location.hostname+'', 'view', '<?php echo $ga_event;?>');
				</script>			
			<?php endif;?>
		<?php endif;?>			
	<?php endif;?>
    <!--Load Js-->
    <?php 
    if(!empty($js)):
  		foreach(array_unique($js) as $value):
   			if(file_exists(realpath(@$this->config->item('path_asset_url').'assets/js/'.$value)) && !empty($value)):
   				echo js_asset($value."?v=2.9")."\n";				
     		endif;
		endforeach;
    endif;
    ?>
    <!--Load Css-->
    <?php 
    if(!empty($css)):
		foreach(array_unique($css) as $value):
			if(file_exists(realpath(@$this->config->item('path_asset_url').'assets/css/'.$value)) && !empty($value)):
				echo css_asset($value."?v=2.9",'', array('media'=>'all'))."\n";			
			endif;
		endforeach;
    endif;
    ?>
    <!--Load External Js-->
    <?php
    if(!empty($external_js)):
	?>
	<script type="text/javascript" language="javascript">
    	<?php echo $external_js;?>
	</script>
	<?php
    endif;
    ?>
    <!--Load External Css-->
    <?php
    if(!empty($external_css)):
	?>
	<style type="text/css">
    	<?php echo $external_css;?>
	</style>
	<?php
    endif;
    ?>		
</head>
<body>
	<!-- Hawkeye : The data collection tag -->
	<script type="text/javascript">
		function DM_prepClient(csid,client) {
			var category_hawkeye = $.parseJSON('<?php echo json_encode($hawkeye_category_name);?>');
			$.each(category_hawkeye,function(key,items){
				client.DM_addEncToLoc("y2p_category", ""+items+""); 
			});
		}
	</script>
	<script src="//js.revsci.net/gateway/gw.js?csid=F09828&auto=t&bpid=you2play"></script>	
	<!--Topest Banner 1310x100-->
<!--	<div style="position: relative;width:1310px;margin:0 auto;">
		<?php //echo image_asset("default/event_top.jpg","",array("width" => 1310,"height" => 100));?>
	</div>-->
	<!--Facebook Script-->
	<div id="fb-root"></div>
	<script type="text/javascript" language="javascript">
		window.fbAsyncInit = function()
		{
			// init the FB JS SDK
			FB.init(
				{
					appId      : '<?php echo $this->config->item("fb_api");?>', // App ID from the App Dashboard
					//channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File for x-domain communication
					status     : true, // check the login status upon init?
					cookie     : true, // set sessions cookies to allow your server to access the session?
					xfbml      : true  // parse XFBML tags on this page?
				});
		};

		// Load the SDK's source Asynchronously
		// Note that the debug version is being actively developed and might
		// contain some type checks that are overly strict.
		// Please report such bugs using the bugs tool.
		(function(d, debug)
			{
				var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
				if (d.getElementById(id))
				{
					return;
				}
				js = d.createElement('script'); js.id = id; js.async = true;
				js.src = "//connect.facebook.net/th_TH/all" + (debug ? "/debug" : "") + ".js";
				ref.parentNode.insertBefore(js, ref);
			}(document, /*debug*/ false));
	</script>	
	<!--Wrapper-->
	<div id="wrapper">
		<?php if($active_wrap_all):?>
			<!-- Wrap All -->
			<script type='text/javascript'>
			<!--// <![CDATA[
			var OA_zones = {
			'ads_left' : 132,
			'ads_top' : 9,
			'ads_right' : 133
			}
			// ]]> -->
			</script>
			<script type='text/javascript' src='http://ads.you2play.com/openx/delivery/spcjs.php'></script>	
			<div id='wrap_all'>
				<div class='wrap_left'>
					<script type='text/javascript'>
					<!--// <![CDATA[
					OA_show('ads_left');
					// ]]> -->
					</script>			
				</div>
				<div class='wrap_middle'>
					<script type='text/javascript'>
					<!--// <![CDATA[
					OA_show('ads_top');
					// ]]> -->
					</script>
				</div>		
				<div class='wrap_right'>
					<script type='text/javascript'>
					<!--// <![CDATA[
					OA_show('ads_right');
					// ]]> -->
					</script>		
				</div>		
			</div>
		<?php endif;?>
		<div id="container">
			<!--Header-->
			<div id="header">
				<a id="you2play_logo" href="<?php echo $main_url;?>"></a>
			</div>
			<!--Top Menu-->
			<div id="top_menu">
				<ul>
					<li><a title="หน้าแรก" href="<?php echo $main_url;?>" class="topMenu home">หน้าแรก</a></li>
					<li>
						<a title="สถานีเพลง" href="<?php echo $playlist_url;?>" class="topMenu playlist">สถานีเพลง</a>
					</li>
					<li>
						<a title="ศิลปิน" href="<?php echo $artist_url;?>" class="topMenu artist">ศิลปิน</a>
						<?php if(isset($notification) && !empty($notification['artist_notification'])) echo "<span class=\"notification\">".$notification['artist_notification']."</span>";?>
					</li>
					<li>
						<a title="เพลง" href="<?php echo $music_url;?>" class="topMenu music">เพลง</a>
						<?php if(isset($notification) && !empty($notification['music_notification'])) echo "<span class=\"notification\">".$notification['music_notification']."</span>";?>
					</li>
					<li>
						<a title="คอร์ดเพลง" href="<?php echo $chord_url;?>" class="topMenu chord">คอร์ดเพลง</a>
						<?php if(isset($notification) && !empty($notification['chords_notification'])) echo "<span class=\"notification\">".$notification['chords_notification']."</span>";?>
						<!--<span class="new"></span>-->
					</li>
					<li>
						<a title="วีดีโอ" href="<?php echo $video_url;?>" class="topMenu video">วีดีโอ</a>
						<?php if(isset($notification) && !empty($notification['video_notification'])) echo "<span class=\"notification\">".$notification['video_notification']."</span>";?>
					</li>
					<li>
						<a title="ภาพยนตร์" href="<?php echo $movie_url;?>" class="topMenu movie">ภาพยนตร์</a>
						<?php if(isset($notification) && !empty($notification['movie_notification'])) echo "<span class=\"notification\">".$notification['movie_notification']."</span>";?>
					</li>
					<li>
						<a title="ข่าว/บทความ" href="<?php echo $news_url;?>" class="topMenu news" style="font-size:12px;">ข่าว/บทความ</a>
						<?php if(isset($notification) && !empty($notification['news_notification'])) echo "<span class=\"notification\">".$notification['news_notification']."</span>";?>
					</li>
					<li>
						<a title="แฟชั่น" href="<?php echo $fashion_url;?>" class="topMenu fashion">แฟชั่น</a>
						<?php if(isset($notification) && !empty($notification['fashion_notification'])) echo "<span class=\"notification\">".$notification['fashion_notification']."</span>";?>
					</li>
					<li>
						<a title="แกลเลอรี่" href="<?php echo $gallery_url;?>" class="topMenu shop">แกลเลอรี่</a>
						<?php if(isset($notification) && !empty($notification['gallery_notification'])) echo "<span class=\"notification\">".$notification['gallery_notification']."</span>";?>
					</li>
				</ul>
				<!--Top Search-->
				<div id="top_search">
					<!--Social-->
					<div class="social">
						<!--True Hits-->
						<span id="true_hits">					
							<iframe src="<?php echo base_url('truehitsstat.php');?>" width="14" height="17" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" allowtransparency="true" style="visibility:hidden;"></iframe>
						</span>						
						<a target="_blank" title="facebook you2play" href="http://www.facebook.com/you2play">
                           <?php echo image_asset('default/fb.png','',array('width' => 24,'height' => 24));?>
                        </a>
                        <a target="_blank" title="twitter you2play" href="http://twitter.com/you2play">
						   <?php echo image_asset('default/tt.png','',array('width' => 24,'height' => 24));?>
                        </a>
					</div>
					<!--Text Search-->
					<?php //echo $this->router->class;?>
					<input type="text" name="txtSearch-all" autocomplete="off" placeholder="ค้นหาอะไรก็เจอ..."/>
				</div>
				<!--You2play Tv Link-->
				<a id="top_you2play_tv" href="http://www.you2play.com/live"><?php echo image_asset('default/you2play_live_tv.png','',array('width' => 79,'height' => 59));?></a>
			</div>
			<!--Nav Menu-->
			<?php if(isset($top_sub_menu) && !empty($top_sub_menu)) echo $top_sub_menu;?>	
			<!--Ads Push Down-->
			<?php if($active_ads_pushdown && $this->uri->segment(1) == ""):?>
			<div id="ads_pushdown" style="width: 970px;padding:0 10px;background-color:#FFFFFF; ">
				<script type='text/javascript'>
				<!--//<![CDATA[
				   var m3_u = (location.protocol=='https:'?'https://ads.you2play.com/openx/delivery/ajs.php':'http://ads.you2play.com/openx/delivery/ajs.php');
				   var m3_r = Math.floor(Math.random()*99999999999);
				   if (!document.MAX_used) document.MAX_used = ',';
				   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
				   document.write ("?zoneid=137");
				   document.write ('&amp;cb=' + m3_r);
				   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
				   document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
				   document.write ("&amp;loc=" + escape(window.location));
				   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
				   if (document.context) document.write ("&context=" + escape(document.context));
				   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
				   document.write ("'><\/scr"+"ipt>");
				//]]>-->
				</script>
				<noscript><a href='http://ads.you2play.com/openx/delivery/ck.php?n=a77e6eb4&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://ads.you2play.com/openx/delivery/avw.php?zoneid=137&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a77e6eb4' border='0' alt='' /></a></noscript>
	<!--		<iframe id='ab15560b' name='ab15560b' src='http://ads.you2play.com/openx/delivery/afr.php?zoneid=137&amp;cb=INSERT_RANDOM_NUMBER_HERE' frameborder='0' scrolling='no' width='960' height='300'><a href='http://ads.you2play.com/openx/delivery/ck.php?n=aad598c3&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://ads.you2play.com/openx/delivery/avw.php?zoneid=137&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=aad598c3' border='0' alt='' /></a></iframe>	-->	
			</div>
			<?php endif;?>
			<!--Content-->
			<div id="content">
				<?php echo $this->load->view($content);?>
			</div>		
		</div>
	</div>
	<!--Footer-->
	<div id="footer_external">
		<div id="footer">
			<div id="footer-logo-detail">
				<ul>
					<li class="first"><a href="<?php echo $main_url;?>" title="หน้าแรก">หน้าแรก</a>|</li>
					<li><a href="<?php echo $artist_url;?>" title="">ศิลปิน</a>|</li>
					<li> <a href="<?php echo $music_url;?>" title="ฟังเพลง">ฟังเพลง</a>|</li>
					<li><a href="<?php echo $video_url;?>" title="วีดีโอ">วีดีโอ</a>|</li>
					<li><a href="<?php echo $main_url.'live';?>" title="you2playTV">ดูทีวี</a>|</li>
					<li><a href="<?php echo $movie_url;?>" title="ดูหนัง">ดูหนัง</a>|</li>
					<li><a href="<?php echo $news_url;?>" title="ข่าวและกิจกรรม">ข่าวบันเทิง</a>|</li>
					<li><a href="<?php echo $fashion_url;?>" title="แฟชั่น">แฟชั่น</a>|</li>
					<!--<li><a href="<?php echo $main_url.'member/profile';?>" title="มุมสมาชิก">มุมสมาชิก</a>|</li>-->
					<li><a href="<?php echo $main_url.'career';?>" title="ร่วมงานกับเรา">ร่วมงานกับเรา</a>|</li>
					<li><a href="mailto:webmaster@you2play.com" title="ติดต่อเรา">ติดต่อเรา</a>|</li>
					<li><a href="<?php echo $main_url.'advertising';?>" title="ติดต่อโฆษณา" class="advertising">ติดต่อโฆษณา</a>|</li>
					<li><a href="<?php echo $main_url.'policy/website';?>" title="นโยบายความเป็นส่วนตัว">นโยบายความเป็นส่วนตัว</a></li>
				</ul>
				<div>
					หากคุณต้องการ แนะนำ ติ-ชม หรือมีข่าวสารที่น่าสนใจต้องการนำเสนอผ่านเว็บไซต์ <a title="ฟังเพลง" href="http://www.you2play.com">you2play.com</a> ติดต่อมาที่ <a href="mailto:webmaster@you2play.com" title="webmaster@you2play.com" target="_blank">webmaster@you2play.com</a>			
				</div>
			</div>	
	 	</div>
	</div>
	<div id="toTop">^ Back to Top</div>
	<?php if($this->router->class == "home" && $this->router->method == "index"):?>
		<!--True Hits Click Map -->
		<script type="text/javascript" src="http://hits.truehits.in.th/clickmap/clickmap.js"></script >
		<script type="text/javascript">
		clickMapSite = 'r0028318';
		</script>	
	<?php endif;?>
	<!-- BEGIN EFFECTIVE MEASURE CODE -->
	<!-- COPYRIGHT EFFECTIVE MEASURE -->
	<script type="text/javascript">
		(function() {
			var em = document.createElement('script'); em.type = 'text/javascript'; em.async = true;
			em.src = ('https:' == document.location.protocol ? 'https://th-ssl' : 'http://th-cdn') + '.effectivemeasure.net/em.js';
			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(em, s);
		})();
	</script>
	<noscript>
		<img src="//th.effectivemeasure.net/em_image" alt="" style="position:absolute; left:-5px;" />
	</noscript>
	<!--END EFFECTIVE MEASURE CODE -->
	<!--Ads Floating-->
	<?php if(!empty($active_ads_floating)):?>
		<script type="text/javascript" language="javascript">
			function ads_floating(w,h){
				$('#ads_floating_shield').css({
					'position':'fixed',
					'top':0,
					'left':0,
					'background':'#FFFFFF',
					'opacity':'0.1',
					'width':'100%',
					'height':'100%',
					'z-index':9999
				});				
				$('#ads_floating').css({
					'position':'absolute',
					'top':parseInt((screen.height/2 - h/2),10)-50,
					'left':parseInt((screen.width/2 - w/2),10),
					'width':''+w+'px',
					'height':''+h+'px',
					'z-index':9999
				});
				$('#ads_floating').find('.btnClose').show();
				$(window).scroll(function(){
					$('#ads_floating').css({
						'top':parseInt((screen.height/2 - h/2),10)-50+$(this).scrollTop()
					});
				});
			}	
		</script>
		<div id="ads_floating_shield"></div>
		<div id="ads_floating">	
			<a href="javascript:void(0);" onclick="$('#ads_floating,#ads_floating_shield').fadeOut('fast').remove();" class="btnClose">Close [&times;]</a>
			<script type='text/javascript'>
			<!--//<![CDATA[
			   var m3_u = (location.protocol=='https:'?'https://ads.you2play.com/openx/delivery/ajs.php':'http://ads.you2play.com/openx/delivery/ajs.php');
			   var m3_r = Math.floor(Math.random()*99999999999);
			   if (!document.MAX_used) document.MAX_used = ',';
			   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
			   document.write ("?zoneid=149");
			   document.write ('&amp;cb=' + m3_r);
			   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
			   document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
			   document.write ("&amp;loc=" + escape(window.location));
			   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
			   if (document.context) document.write ("&context=" + escape(document.context));
			   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
			   document.write ("'><\/scr"+"ipt>");
			//]]>-->
			</script>
			<noscript><a href='http://ads.you2play.com/openx/delivery/ck.php?n=a63b3e00&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://ads.you2play.com/openx/delivery/avw.php?zoneid=149&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a63b3e00' border='0' alt='' /></a></noscript>
		</div>
	<?php endif;?>	
	<!--Cover Page-->
	<?php if(!empty($active_cover_page)):?>
		<script type="text/javascript" language="javascript">
		    (function($) {
		        /*whatever jQuery stuff*/
		        $(function(){
					//Colorbox
					$.colorbox({
						open:true,
						iframe:true,
						width:1024,
						height:600,
						href:'http://'+document.domain+'/cover_page',
						scrolling:false
					});
		        });
		    })(jQuery);
		</script>
	<?php endif;?>
</body>
</html>